home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 404_02 / bisnp / Makefile < prev    next >
Encoding:
Makefile  |  1993-11-07  |  6.5 KB  |  206 lines

  1. # Generated automatically from Makefile.in by configure.
  2. # Makefile for bison
  3. # Copyright (C) 1988, 1989, 1991, 1993 Bob Corbett and Free Software Foundation, Inc.
  4. # This file is part of Bison, the GNU Compiler Compiler.
  5. # Bison is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2, or (at your option)
  8. # any later version.
  9. # Bison is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13. # You should have received a copy of the GNU General Public License
  14. # along with Bison; see the file COPYING.  If not, write to
  15. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  16.  
  17. #### Start of system configuration section. ####
  18.  
  19. srcdir = .
  20. VPATH = .
  21.  
  22. CC = cc
  23. INSTALL = /bin/install -c
  24. INSTALL_PROGRAM = $(INSTALL)
  25. INSTALL_DATA = $(INSTALL) -m 644
  26. MAKEINFO = makeinfo
  27.  
  28. # Things you might add to DEFS:
  29. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  30. # -DHAVE_STRING_H    If you don't have ANSI C headers but have string.h.
  31. # -DHAVE_MEMORY_H    If you don't have ANSI C headers and have memory.h.
  32. # -DHAVE_STRERROR    If you have strerror function.
  33. DEFS =  -Dconst= -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MEMORY_H=1 -DHAVE_ALLOCA_H=1
  34.  
  35. CFLAGS = -g
  36. LDFLAGS = -g
  37.  
  38. LIBS = 
  39.  
  40. # Some System V machines do not come with libPW.  If this is true, use
  41. # the GNU alloca.o here.
  42. ALLOCA = 
  43.  
  44. prefix = $(ENV_DIR)/tools
  45. exec_prefix = $(prefix)
  46.  
  47. # where the installed binary goes
  48. bindir = $(exec_prefix)/bin
  49.  
  50. # where the parsers go
  51. datadir = $(prefix)/lib
  52.  
  53. # where the info files go
  54. infodir = $(ENV_DIR)/doc/info
  55.  
  56. # where manual pages go and what their extensions should be
  57. manext = 1
  58. mandir = $(ENV_DIR)/doc/man/man$(manext)
  59.  
  60. # dman documentation parser
  61. .SUFFIXES : .dman
  62. .dman :
  63.     dman <$*.dman >$@
  64.     pman -t $@ >$*.ps
  65. default : all
  66.  
  67. backup :
  68.     find . \( -name '*.o' -o -name '*%' -o -name 'bison++' -o -name '.tar.excludes' \) -print >.tar.excludes
  69.     tar cvfX - .tar.excludes . | compress -cv >../bison++.tar.Z
  70.  
  71. #### End of system configuration section. ####
  72.  
  73. SHELL = /bin/sh
  74. DISTFILES = COPYING ChangeLog Makefile.in configure configure.in \
  75.     REFERENCES bison.1 bison++.1 bison.rnh configure.bat \
  76.     bison.cc bison.h bison.hairy \
  77.     lr0.c allocate.c closure.c conflict.c derives.c \
  78.     files.c getargs.c gram.c lalr.c lex.c main.c nullable.c \
  79.     output.c print.c reader.c reduce.c symtab.c version.c \
  80.     warshall.c files.h gram.h lex.h machine.h new.h state.h \
  81.     symtab.h system.h types.h bison.cld build.com vmsgetargs.c \
  82.     vmshlp.mar README INSTALL bison.texinfo bison.info* texinfo.tex \
  83.     getopt.c getopt.h getopt1.c alloca.c mkinstalldirs
  84.  
  85. # This rule allows us to supply the necessary -D options
  86. # in addition to whatever the user asks for.
  87. .c.o:
  88.     $(CC) -c $(DEFS) -I$(srcdir)/../include $(CPPFLAGS) $(CFLAGS) $<
  89.  
  90. # names of parser files
  91. PFILE = bison.cc
  92. PFILE1 = bison.hairy
  93. HFILE = bison.h
  94.  
  95. PFILES = -DXPFILE=\"$(datadir)/$(PFILE)\" \
  96.      -DXHFILE=\"$(datadir)/$(HFILE)\" \
  97.      -DXPFILE1=\"$(datadir)/$(PFILE1)\"
  98.  
  99. OBJECTS = lr0.o allocate.o closure.o conflict.o derives.o files.o    \
  100.       getargs.o gram.o lalr.o lex.o                    \
  101.       main.o nullable.o output.o print.o reader.o reduce.o symtab.o    \
  102.       warshall.o version.o                        \
  103.       getopt.o getopt1.o $(ALLOCA)
  104.  
  105. all: bison++ bison.info
  106.  
  107. Makefile: Makefile.in config.status
  108.     ./config.status
  109.  
  110. config.status: configure
  111.     ./config.status --recheck
  112.  
  113. configure: configure.in
  114.     cd $(srcdir); autoconf
  115.  
  116. clean:
  117.     rm -f *.o core bison++
  118.  
  119. mostlyclean: clean
  120.  
  121. distclean: clean
  122.     rm -f Makefile config.status
  123.  
  124. realclean: distclean
  125.     rm -f TAGS *.info*
  126.  
  127. # Most of these deps are in case using RCS.
  128. install: all bison++.1 bison.1 $(srcdir)/$(PFILE) $(srcdir)/$(PFILE1) $(srcdir)/$(HFILE) installdirs uninstall
  129.     $(INSTALL_PROGRAM) bison++ $(bindir)/bison++
  130.     -cd $(datadir); rm -f $(PFILE) $(HFILE)
  131.     #-cd $(datadir); rm -f $(PFILE1) 
  132.     $(INSTALL_DATA) $(srcdir)/$(PFILE) $(datadir)/$(PFILE)
  133.     $(INSTALL_DATA) $(srcdir)/$(HFILE) $(datadir)/$(HFILE)
  134.     -chmod a+r $(datadir)/$(PFILE) $(datadir)/$(HFILE) 
  135.     #$(INSTALL_DATA) $(srcdir)/$(PFILE1) $(datadir)/$(PFILE1)
  136.     -chmod a+r $(datadir)/$(PFILE) $(datadir)/$(HFILE) 
  137.     #-chmod a+r $(datadir)/$(PFILE1) 
  138.     #-$(INSTALL_DATA) $(srcdir)/bison.1 $(mandir)/bison.$(manext)
  139.     #-chmod a+r $(mandir)/bison.$(manext)
  140.     -$(INSTALL_DATA) $(srcdir)/bison++.1 $(mandir)/bison++.$(manext)
  141.     -chmod a+r $(mandir)/bison++.$(manext)
  142.     #for file in $(srcdir)/bison.info*; \
  143.     #do $(INSTALL_DATA) $$file $(infodir)/$$file; \
  144.     #done
  145. # Make sure all installation directories, e.g. $(bindir) actually exist by
  146. # making them if necessary.
  147. installdirs:
  148.     -sh $(srcdir)/mkinstalldirs $(bindir) $(datadir) $(libdir) $(infodir) $(mandir)
  149.  
  150. uninstall:
  151.     rm -f $(bindir)/bison++
  152.     -cd $(datadir); rm -f $(PFILE) $(HFILE)
  153.     #-cd $(datadir); rm -f $(PFILE1)
  154.     rm -f $(mandir)/bison++.$(manext)
  155.     #rm -f $(mandir)/bison.$(manext) $(infodir)/bison.info*
  156.  
  157. bison++: $(OBJECTS)
  158.     $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
  159.  
  160. dist: bison.info
  161.     echo bison-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
  162.     -rm -rf `cat .fname`
  163.     mkdir `cat .fname`
  164.     cp -p getopt.[ch] getopt1.c alloca.c `cat .fname`
  165.     tar chZf `cat .fname`.tar.Z `cat .fname`
  166.     dst=`cat .fname`; for f in $(DISTFILES); do \
  167.        ln $(srcdir)/$$f $$dst/$$f || { echo copying $$f; cp -p $(srcdir)/$$f $$dst/$$f ; } \
  168.     done
  169.     tar --gzip -chf `cat .fname`.tar.gz `cat .fname`
  170.     -rm -rf `cat .fname` .fname
  171.  
  172. bison.info: bison.texinfo
  173.     $(MAKEINFO) $(srcdir)/bison.texinfo
  174.  
  175. TAGS: *.c *.h
  176.     etags *.c *.h
  177.  
  178. # This file is different to pass the parser file names to the compiler.
  179. files.o: files.c
  180.     $(CC) -c $(PFILES) $(DEFS) $(CPPFLAGS) $(CFLAGS) \
  181.        $(srcdir)/files.c $(OUTPUT_OPTION)
  182.  
  183. lr0.o: system.h machine.h new.h gram.h state.h
  184. closure.o: system.h machine.h new.h gram.h
  185. conflict.o: system.h machine.h new.h files.h gram.h state.h
  186. derives.o: system.h new.h types.h gram.h
  187. files.o: system.h files.h new.h gram.h
  188. getargs.o: system.h files.h
  189. lalr.o: system.h machine.h types.h state.h new.h gram.h
  190. lex.o: system.h files.h symtab.h lex.h
  191. main.o: system.h machine.h
  192. nullable.o: system.h types.h gram.h new.h
  193. output.o: system.h machine.h new.h files.h gram.h state.h
  194. print.o: system.h machine.h new.h files.h gram.h state.h
  195. reader.o: system.h files.h new.h symtab.h lex.h gram.h
  196. reduce.o: system.h machine.h files.h new.h gram.h
  197. symtab.o: system.h new.h symtab.h gram.h
  198. warshall.o: system.h machine.h
  199.  
  200. # Prevent GNU make v3 from overflowing arg limit on SysV.
  201. .NOEXPORT:
  202.